<template>
  <div>
    <div>这是祖父组件</div>
    <ProvideParent />
  </div>
</template>

<script setup lang="ts">
import { provide, ref } from 'vue'
import ProvideParent from './ProvideParent.vue'
const parentData = ref('这是来自祖父组件的数据')
const money = ref(10000)
provide('parentData', parentData)
provide('money', money)
const changeData = () => {
  parentData.value = '数据被修改了'
  money.value += 1
}
provide('changeData', changeData)
</script>

<style scoped></style>
